package com.fm.base.database;

public class DBSortField {
	public String field;
	public DBSortOrder order;

	public DBSortField(String field, DBSortOrder order) {
		this.field = field;
		this.order = order;
	}

	@Override
	public String toString() {
		switch (order) {
			case DESC:
				return field + " desc";
			case ASC:
				return field + " asc";
			default:
				throw new IllegalArgumentException("" + order);
		}
	}
}
